<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Twisted code examples</title>
</head>

<body>
    <h1>Twisted code examples</h1>

    <h2>Simple Echo server and client</h2>
    <ul>
        <li><a href="simpleclient.py">simpleclient.py</a> - simple TCP client</li>
        <li><a href="simpleserv.py">simpleserv.py</a> - simple TCP echo server</li>
    </ul>

    <h2>Chat</h2>
    <ul>
      <li><a href="chatserver.py">chatserver.py</a> - shows how to communicate between clients</li>
    </ul>

    <h2>Echo server &amp; client variants</h2>
    <ul>
        <li><a href="echoserv.py">echoserv.py</a> - variant on a simple TCP echo server</li>
        <li><a href="echoclient.py">echoclient.py</a> - variant on a simple TCP client</li>
        <li><a href="echoserv_udp.py">echoserv_udp.py</a> - simplest possible
        UDP server</li>
        <li><a href="echoclient_udp.py">echoclient_udp.py</a> - simple UDP
        client</li>
        <li><a href="echoserv_ssl.py">echoserv_ssl.py</a> - simple SSL server</li>
        <li><a href="echoclient_ssl.py">echoclient_ssl.py</a> - simple SSL client</li>
    </ul>

    <h2>AMP server &amp; client variants</h2>
    <ul>
        <li><a href="ampserver.py">ampserver.py</a> - do math using AMP</li>
        <li><a href="ampclient.py">ampclient.py</a> - do math using AMP</li>
    </ul>

    <h2>Perspective Broker</h2>
    <ul>
        <li><a href="pbsimple.py">pbsimple.py</a> - simplest possible PB server</li>
        <li><a href="pbsimpleclient.py">pbsimpleclient.py</a> - simplest possible PB
        client</li>
        <li><a href="pbbenchclient.py">pbbenchclient.py</a> - benchmarking client</li>
        <li><a href="pbbenchserver.py">pbbenchserver.py</a> - benchmarking server</li>
        <li><a href="pbecho.py">pbecho.py</a> - echo server that uses login</li>
        <li><a href="pbechoclient.py">pbechoclient.py</a> - echo client using login</li>
        <li><a href="pb_exceptions.py">pb_exceptions.py</a> - example of exceptions over PB</li>
        <li><a href="pbgtk2.py">pbgtk2.py</a> - example of using GTK2 with PB</li>
        <li><a href="pbinterop.py">pbinterop.py</a> - shows off various types supported by PB</li>
        <li><a href="bananabench.py">bananabench.py</a> - benchmark for banana</li>
    </ul>

    <h2>Cred</h2>
    <ul>
        <li><a href="cred.py">cred.py</a> - Authenticate a user with an in-memory username/password
        database</li>
        <li><a href="dbcred.py">dbcred.py</a> - Using a database backend to authenticate a user</li>
    </ul>

    <h2>GUI</h2>
    <ul>
        <li><a href="wxdemo.py">wxdemo.py</a> - demo of wxPython integration with Twisted</li>
        <li><a href="pbgtk2.py">pbgtk2.py</a> - example of using GTK2 with PB</li>
        <li><a href="pyuidemo.py">pyuidemo.py</a> - PyUI</li>
    </ul>

    <h2>FTP examples</h2>
    <ul>
        <li><a href="ftpclient.py">ftpclient.py</a> - example of using the FTP client</li>
        <li><a href="ftpserver.py">ftpserver.py</a> - create an FTP server which
        serves files for anonymous users from the working directory and serves
        files for authenticated users from <code class="shell">/home</code>.</li>
    </ul>

    <h2>Logging</h2>
    <ul>
        <li><a href="twistd-logging.tac">twistd-logging.tac</a> - logging example using
        ILogObserver</li>
        <li><a href="testlogging.py">testlogging.py</a> - use twisted.python.log to log errors to
        standard out</li>
        <li><a href="rotatinglog.py">rotatinglog.py</a> - example of log file rotation</li>
    </ul>

    <h2>POSIX Specific Tricks</h2>
    <ul>
      <li><a href="sendfd.py">sendfd.py</a>, <a href="recvfd.py">recvfd.py</a> - send and receive
      file descriptors over UNIX domain sockets
      </li>
    </ul>

    <h2>Miscellaneous</h2>
    <ul>
        <li><a href="shaper.py">shaper.py</a> - example of rate-limiting your web server</li>
        <li><a href="stdiodemo.py">stdiodemo.py</a> - example using stdio, Deferreds, LineReceiver
        and twisted.web.client.</li>
        <li><a href="mouse.py">mouse.py</a> - example using MouseMan protocol with the SerialPort
        transport</li>
        <li><a href="ptyserv.py">ptyserv.py</a> - serve shells in pseudo-terminals over TCP</li>
        <li><a href="courier.py">courier.py</a> - example of interfacing to Courier's mail filter
        interface</li>
        <li><a href="longex.py">longex.py</a> - example of doing arbitarily long calculations nicely
        in Twisted</li>
        <li><a href="longex2.py">longex2.py</a> - using generators to do long calculations</li>
        <li><a href="stdin.py">stdin.py</a> - reading a line at a time from standard input
        without blocking the reactor</li>
        <li><a href="streaming.py">streaming.py</a> - example of a push producer/consumer system</li>
        <li><a href="filewatch.py">filewatch.py</a> - write the content of a file to standard out
        one line at a time</li>
        <li><a href="shoutcast.py">shoutcast.py</a> - example Shoutcast client</li>
        <li><a href="gpsfix.py">gpsfix.py</a> - example using the SerialPort transport and GPS
        protocols to display fix data as it is received from the device</li>
        <li><a href="wxacceptance.py">wxacceptance.py</a> - acceptance tests for wxreactor</li>
        <li><a href="postfix.py">postfix.py</a> - test application for PostfixTCPMapServer</li>
    </ul>

</body>
</html>
